﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%var item = ViewData["data"] as RecruitSheetModel; %>大学生兼职网 -<%:item.Caption %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <link href="/content/css/main.css" rel="stylesheet" type="text/css" />
    <link href="/content/css/joblist.css" rel="stylesheet" type="text/css" />
    <link href="/content/css/company.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">
        function DoDiscussFeedback(type, id) {
            $.ajax({
                url: '/home/discussfeedback',
                data: { type: type, id: id },
                cache: true,
                success: function () { window.location.href = window.location.href; }
            });
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%var recruitment = ViewData["data"] as RecruitSheetModel; %>
        <div class="content">
            <div class="contentline">
                <div style="width: 100%; height: 15px; overflow: hidden">
                </div>
                <div class="left">
                    <a href="/">
                        <img alt="重庆大学生兼职网" src="/content/images/logo2.png" /></a></div>
                <div class="left">
                    <div class="main-nav-top">
                        <a href="/">重庆大学生兼职网</a> > <a>兼职评论</a></div>
                </div>
                <div class="right" style="margin-top: 20px; padding-right: 2px;">
                     <%if (HttpContext.Current.User.Identity.IsAuthenticated)
                  {
                      if (new UserService(HttpContext.Current.User.Identity.Name).GetUser().Role == MemberStatus.Firm)
                      { %>
                <a href="/CompanyCenter/Recruiting" target="_blank">
                    <img alt="发布兼职" src="/content/images/button-jzfb.png" /></a>
                    <%}
                  else
                  {%>
                <a href="/home/roleselect" target="_blank">
                    <img alt="发布兼职" src="/content/images/button-jzfb.png" /></a>
                <%} %>
                <%}
                  else
                  {%>
                <a href="/home/roleselect" target="_blank">
                    <img alt="发布兼职" src="/content/images/button-jzfb.png" /></a>
                <%} %>
                </div>
                <div style="width: 100%; height: 10px; overflow: hidden">
                </div>
            </div>
            <div class="company">
                <div class="company-title">
                    <div class="left">
                        <h1>
                            <%:recruitment.Caption %></h1>
                    </div>
                </div>
                <div class="company-info">
                    <div>
                        发布时间：<%:recruitment.PublishDate.ToString("yyyy年MM月dd日 hh:mm") %></div>
                    <div>
                        兼职地点：<%:recruitment.WorkArea.Mapping() %> - <%:recruitment.WorkAddress %></div>
                    <div>
                        招聘企业：<a target="_blank" style="color:#900808;" href="/home/morejob_ag=<%:EncodeByBase64.Encode(recruitment.Recruiter) %>"><%=recruitment.AgentInfo.CorporationInfo.CompanyName%></a></div>
                </div>
            </div>
            <div class="hspace10">
            </div>
            <div class="hspace10">
            </div>
            <%var discuss = ViewData["Discuss"] as ItemListBox<ShortDiscussModel>; %>
            <div class="company-subtitle">
                <div class="left">
                    <div class="company-subtitle-text">
                        网友们对该兼职的评论</div>
                </div>
                 <%string[] appraiseDetail = ViewData["appraiseDetail"].ToString().Split(':');
                    string apr = HttpContext.Current.GetParameter("apr");%>
                <div class="comments-type">
                    <a href="?id=<%:HttpContext.Current.GetParameter("id") %>&page=<%:HttpContext.Current.GetParameter("page") %>&apr=-1" <%if(String.IsNullOrEmpty(apr) || apr == "-1"){ %> class="current"<%} %>>所有:<%:appraiseDetail[3]%></a> 
                    <a href="?id=<%:HttpContext.Current.GetParameter("id") %>&page=<%:HttpContext.Current.GetParameter("page") %>&apr=1" <%if(apr == "1"){ %> class="current"<%} %>>好评:<%:appraiseDetail[0] %></a> 
                    <a href="?id=<%:HttpContext.Current.GetParameter("id") %>&page=<%:HttpContext.Current.GetParameter("page") %>&apr=0" <%if(apr == "0"){ %> class="current"<%} %>>中评:<%:appraiseDetail[1] %></a>
                    <a href="?id=<%:HttpContext.Current.GetParameter("id") %>&page=<%:HttpContext.Current.GetParameter("page") %>&apr=2" <%if(apr == "2"){ %> class="current"<%} %>>差评:<%:appraiseDetail[2] %></a>
                </div>
            </div>
            <div class="comments">
            <%if (discuss.ItemTotle > 0)
              {
                  MemberModel User = null;
                  foreach (var item in discuss.Data)
                  { %>
                <div class="comment-item">
                    <div class="comment-item-img">
                        <img alt="匿名用户" src="/content/images/noheadpic.jpg" />
                    </div>
                    <div class="comment-item-content">
                        <div style="width: 100%; overflow: hidden">
                            <div class="left" style="color: #999">
                                <%if (String.IsNullOrEmpty(item.Author))
                                  { %>
                                  匿名用户
                                <%}
                                  else
                                  { %>
                                    <%User = new ueEngine.Biz.Core.AppService.Member.UserService(item.Author).GetUser();
                                      if (User != null)
                                      { %>
                                      <%:User.Location%> 用户
                                    <%}
                                      else
                                      { %>
                                        匿名用户
                                    <%} %>
                                <%} %>：</div>
                            <div class="left"></div>
                            <div class="right" style="color: #999">
                                发表日期：<%:item.WriteDate.ToString("yyyy-MM-dd HH:mm")%></div>
                        </div>
                        <div class="comment-item-content-main">
                            <span class="number">[<%:item.Appraise.Mapping()%>]</span>：<%=item.Content%>
                        </div>
                        <div style="width: 100%; overflow: hidden">
                            <div class="comment-item-vote">
                                <a href="javascript:;" onclick="DoDiscussFeedback('1','<%:item.Id %>')">赞同[<%:item.Up%>]</a> | <a href="javascript:;" onclick="DoDiscussFeedback('0','<%:item.Id %>')">反对[<%:item.Down%>]</a></div>
                        </div>
                    </div>
                </div>
            <%}
              }
              else
              { %>
              <div class="none-item">
                <div class="none-item-icon"></div>
                <div class="none-item-message">
                暂无网友评价该兼职，如果您了解他们，立即<a href="javascript:;" onclick="addfocus()">添加评论</a>
                </div>
              </div>
              <script type="text/javascript">
                  function addfocus() { $('textarea[name="content"]').focus(); }
              </script>
              <%} %>
        <div class="joblist-pages" style="margin-left: 10px; margin-bottom: 15px;">
             <!--上一页-->
                    <%if (discuss.PrePage <= 0 && discuss.CurrentPage == 0)
                      {%>
                    <div class="joblist-pages-prev-gray">
                        <a href="javascript:;"></a>
                    </div>
                    <%}
                      else
                      { %>
                    <div class="joblist-pages-prev">
                        <a href="?id=<%:HttpContext.Current.GetParameter("id") %>&page=<%:discuss.PrePage %>&apr=<%:HttpContext.Current.GetParameter("apr") %>"></a>
                    </div>
                    <%} %>
                    <%=discuss.PageItemSegment%>
                    <%if (discuss.NextPage <= 0 || discuss.NextPage >= discuss.TotlePage || discuss.CurrentPage == discuss.TotlePage - 1)
                      { %>
                    <div class="joblist-pages-next-gray">
                        <a href="javascript:;"></a>
                    </div>
                    <%}
                      else
                      { %>
                    <div class="joblist-pages-next">
                        <a href="?id=<%:HttpContext.Current.GetParameter("id") %>&page=<%:discuss.NextPage %>&apr=<%:HttpContext.Current.GetParameter("apr") %>"></a>
                    </div>
                    <%} %>
        </div>
            </div>
              <form action="/home/postdiscussforrecuritment" method="post">
                <input type="hidden" name="id" value="<%:ViewData["id"] %>" />
                <div class="commentbox">
                    <div style="padding:5px;">
                        <input type="radio" checked="checked" name="Appraise" value="1" id="radgood" /><label for="radgood">好评</label>
                        <input type="radio" name="Appraise" value="0" id="radnormal" /><label for="radnormal">中评</label>
                        <input type="radio" name="Appraise" value="2" id="radpoor" /><label for="radpoor">差评</label>
                    </div>
                    <div>
                        <textarea name="content" style="margin-left: 0px; margin-right: 0px; width: 635px; margin-top: 0px;
                            margin-bottom: 0px; height: 120px;"></textarea>
                    </div>
                    <div style="width: 100%;">
                        <div class="commentbox-note">
                            所有评论仅代表网友意见</div>
                            <div class="commentbox-submit">
                                <input type="image" src="/content/images/usercenter-submit.png" />
                            </div>
                    </div>
                </div>
                </form>
        </div>
       
</asp:Content>

